//using Microsoft.VisualBasic;
using System;

//
// *  NHibernate 代码模版
// 

using System.Collections.Generic;
using System.ComponentModel;

namespace NCS
{
	/// <summary>
	///	
	/// </summary>
	[Serializable()]
    public class curveXishu : ICloneable
	{

		//public event PropertyChangedEventHandler PropertyChanged;
		//protected void OnPropertyChanged(string name)
		//{
		//    PropertyChangedEventHandler handler = PropertyChanged;
		//    if (handler != null)
		//    {
		//        handler(this, new PropertyChangedEventArgs(name));
		//    }
		//}

		#region "构造方法"
		public curveXishu()
		{
			m_ID = 0;
			m_methodid = 0;
			m_x0 = 0;
			m_x1 = 0;
			m_x2 = 0;
			m_x3 = 0;
			m_ele = null;
			m_xadd = 0;
			m_r = 0;
			m_fitMode = 0;
			m_cishu = 0;
			m_stderr = 0;
			m_LINExishu = 0;
			m_calcmode = 0;
			m_useXiaoZheng = 0;
			m_dxielv = 0;
			m_djieju = 0;
			m_UseInt = false;
			m_cmin = 0;
			m_cmax = 0;
			m_blankarea = 0;
			m_must00 = false;
			m_bjsp = 0;
			m_panju = 0;
		}
        public curveXishu(curveXishu cx2)
        {
            //m_ID = cx2.ID ;
            //m_methodid = cx2.methodid ;
            m_x0 = cx2.x0 ;
            m_x1 = cx2.x1 ;
            m_x2 = cx2.x2 ;
            m_x3 = cx2.x3 ;
            m_ele = cx2.ele ;
            m_xadd = cx2.xadd ;
            m_r = cx2.r ;
            m_fitMode = cx2.fitMode ;
            m_cishu = cx2.cishu ;
            m_stderr = cx2.stderr ;
            m_LINExishu = cx2.LINExishu ;
            m_calcmode = cx2.calcmode ;
            m_useXiaoZheng = cx2.useXiaoZheng ;
            m_dxielv = cx2.djieju ;
            m_djieju = cx2.djieju ;
            m_UseInt = cx2.UseInt ;
            m_cmin = cx2.cmin ;
            m_cmax = cx2.cmax ;
            m_blankarea = cx2.blankarea ;
            m_must00 = cx2.must00 ;
            m_bjsp = cx2.bjsp ;
            m_panju = cx2.panju ;
            foreach (curveData d in cx2.curveDataList)
            {
                curveData d1 = (curveData)d.Clone();
                d1.curveXishu = this;
                m_curveDataList.Add( d1);
            }
        }
		#endregion

        public virtual object Clone()
        {
            return new curveXishu(this);
        }
		#region "私有变量"
		//Private m_curveDataList As IList(Of curveData)
		private IList<curveData> m_curveDataList = new List<curveData>();
		private int m_ID;
		private int m_methodid;
		private double m_x0;
		private double m_x1;
		private double m_x2;
		private double m_x3;
		private string m_ele;
		private double m_xadd;
		private double m_r;
		private int m_fitMode;
		private int m_cishu;
		private double m_stderr;
		private double m_LINExishu;
		private short m_calcmode;
		private short m_useXiaoZheng;
		private double m_dxielv;
		private double m_djieju;
		private bool m_UseInt;
		private double m_cmin;
		private double m_cmax;
		private double m_blankarea;
		private bool m_must00;
		private method m_method;
		private double m_bjsp;

		private double m_panju;
        private double m_ln;
        //private double m_hn;
		#endregion


		#region "公有属性"
		public virtual IList<curveData> curveDataList {
			get { return m_curveDataList; }
			set { m_curveDataList = value; }
		}
		public virtual int ID {
			get { return m_ID; }
			set { m_ID = value; }
		}
		///<summary>
		///
		///</summary>
		public virtual int methodid {
			get { return m_methodid; }
			set { m_methodid = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double bjsp {
			get { return m_bjsp; }
			set { m_bjsp = value; }
		}
        public virtual double ln
        {
            get { return m_ln; }
            set { m_ln = value; }
        }
        //public virtual double hn
        //{
        //    get { return m_hn; }
        //    set { m_hn = value; }
        //}
		public virtual double panju {
			get { return m_panju; }
			set { m_panju = value; }
		}

		public virtual double x0 {
			get { return m_x0; }
			set { m_x0 = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double x1 {
			get { return m_x1; }
			set { m_x1 = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double x2 {
			get { return m_x2; }
			set { m_x2 = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double x3 {
			get { return m_x3; }
			set { m_x3 = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual string ele {
			get { return m_ele; }
			set { m_ele = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double xadd {
			get { return m_xadd; }
			set { m_xadd = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double r {
			get { return m_r; }
			set { m_r = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual int fitMode {
			get { return m_fitMode; }
			set { m_fitMode = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual int cishu {
			get { return m_cishu; }
			set { m_cishu = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double stderr {
			get { return m_stderr; }
			set { m_stderr = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double LINExishu {
			get { return m_LINExishu; }
			set { m_LINExishu = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual short calcmode {
			get { return m_calcmode; }
			set { m_calcmode = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual short useXiaoZheng {
			get { return m_useXiaoZheng; }
			set { m_useXiaoZheng = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double dxielv {
			get { return m_dxielv; }
			set { m_dxielv = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double djieju {
			get { return m_djieju; }
			set { m_djieju = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual bool UseInt {
			get { return m_UseInt; }
			set { m_UseInt = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double cmin {
			get { return m_cmin; }
			set { m_cmin = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double cmax {
			get { return m_cmax; }
			set { m_cmax = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual double blankarea {
			get { return m_blankarea; }
			set { m_blankarea = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual bool must00 {
			get { return m_must00; }
			set { m_must00 = value; }
		}

		///<summary>
		///
		///</summary>
		public virtual method method {
			get { return m_method; }
			set { m_method = value; }
		}

		#endregion

		#region "Rewrite Equals and HashCode"
		/// <summary>
		/// 
		/// </summary>
		public override bool Equals(object obj)
		{
			if (object.ReferenceEquals(this, obj)) {
				return true;
			}
			if ((obj == null) || (!object.ReferenceEquals(obj.GetType(), GetType()))) {
				return false;
			}
			curveXishu castObj = (curveXishu)obj;
			return (castObj != null) && (m_methodid == castObj.methodid) && (m_ele == castObj.ele);
		}
		/// <summary>
		/// 用唯一值实现GetHashCode
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * m_methodid.GetHashCode();
			hash = 27 * hash * m_ele.GetHashCode();
			return hash;
		}
		#endregion
	}
}
